package com.hj.config;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

import com.hj.interceptor.LoginInterceptor;
import com.hj.interceptor.LoginInterceptor2;

@Configuration
public class WebConfig implements WebMvcConfigurer {

	@Autowired
	LoginInterceptor2 loginInterceptor;
	
	@Override
	public void addInterceptors(InterceptorRegistry registry) {
		registry.addInterceptor(loginInterceptor).addPathPatterns("/**")
		.excludePathPatterns("/login", "*.js", "/swagger-resources/**", "/webjars/**", "/v2/**", "/swagger-ui.html/**");
	}
	
}
